# {{ ansible_managed }}

{% if resolvconf_options | length > 0 %}
options {{ resolvconf_options | join(' ') }}
{% endif %}

{% if resolvconf_resolver_ips | length > 0 %}
{% for item in resolvconf_resolver_ips %}
nameserver {{ item }}
{% endfor %}
{% else %}
{% for item in groups[resolvconf_resolver_group] %}
# {{ item }}
nameserver {{ hostvars[item]['ansible_host'] }}
{% endfor %}
{% endif %}

{% if resolvconf_search_domains | length > 0 %}
search {{ resolvconf_search_domains | join(' ') }}
{% endif %}
